<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        function f1() {
            // console.log(window.location.href);
            // location.href = 'http://www.baidu.com'
            location.reload()
        }

        function f2() {
            history.back()
            // history.go(-1)
        }

        function f3() {
            history.forward()
        }

    </script>
</head>
<body>
    <button onclick="f1()">操作location</button>
    <button onclick="f2()">后退</button>
    <button onclick="f3()">前进</button>
</body>
</html>